  <script>
function marks(id){
	var answer = confirm("Bạn có chắc chắn muốn xóa không?")
    if (answer){
        window.location = "<?php echo $this->baseUrl(); ?>/admin/contacts/delete/id/"+id;
    }
    
    return false;
    
}
</script>
    <header>
      <h3 class="tabs_involved">Quản lý Khách hàng</h3>
      

    </header>
    <div class="module_content">
        <table cellspacing="0" class="tablesorter tablesorterBorder">
        <thead>
        <tr>
                <th width="15">STT</th>
                <th>Tên</th>
                <th>Địa chỉ</th>
                <th width="120">Mobile</th>
                <th width="100">Email</th>
                <th>Kiểu</th>
                <th>Điều khiển</th>		
                
        </tr>
        </thead>
        <?php foreach($this->data as $key=>$value):
        $class = null;
            if ($key % 2 == 0) {
                $class = ' class="altrow"';
            }
        ?> 
        <tr <?php echo $class;?>>
                <td><?php echo $key + 1;?></td>
                <td><?php echo $value['name']; ?></td>
                 <td><?php echo $value['address']; ?></td>
                <td><?php echo $value['mobile']; ?></th>
                <td><?php echo $value['email']; ?></td>
                <td><?php echo $value['order_key'] == NULL ? "Liên hệ" : "Mua hàng"; ?></td>
                <td><a href="/admin/contacts/view/id/<?php echo $value['id']; ?>">Xem chi tiết</a> | <a href="#" onclick="marks('<?php echo $value['id'];?>')">Delete</a></td>		
                
        </tr>    
        <?php endforeach; ?>
    
        </table>
    </div>
	
 
	<div class="paging">
	
	</div>
